﻿using NUnit.Framework;
using OpenWaves.ActivityFeed.RavenDB;
using OpenWaves.ActivityFeed.UnitTests;
using Raven.Client.Embedded;

namespace OpenWaves.ActivityFeed.UnitTests_RavenDB
{
    [TestFixture]
    public class RavenDbActivityFeedServiceRolesTest : ActivityFeedServiceRolesTest
    {
        protected EmbeddableDocumentStore documentStore;

        [SetUp]
        public void InitializeDocumentStore()
        {
            this.documentStore = new EmbeddableDocumentStore() { RunInMemory = true };

            DocumentStoreFactory.InitializeDocumentStore(this.documentStore);
        }

        [TearDown]
        public void DisposeDocumentStore()
        {
            this.documentStore.Dispose();
        }

        protected override IActivityFeedTestSession CreateSession()
        {
            return new RavenDbActivityFeedServiceTestSession(this.documentStore.OpenSession());
        }        
    }
}